The availability of low cost and small microelectromechanical systems (MEMS) accelerometers has created a large variety of new commercial applications with their inclusion in smart phones and other handheld or mobile devices. For example, as compared with other types of MEMS accelerometer technologies, a thermal MEMS accelerometer, which is based on the principle of measuring internal changes of convection heat transfer due to the acceleration applied, has superior advantages for consumer applications, including a low cost fabrication process, high reliability and very good shock or impact resistance.
Furthermore, advances in magnetometer technologies also make it possible (cost, size and power consumption) to closely integrate a three-axis magnetometer with a three-axis accelerometer in a mobile device to form an electronic compass to provide quasi-static attitude and heading information for enabling new applications, for example, location-based services.
The local environment in which a magnetometer or accelerometer is deployed can cause measurement fluctuations. As one example, changes in temperature can affect the measurements as can other factors.
The principle of a magnetic compass is to determine a magnetic heading by measuring the Earth's magnetic field. However, inside a mobile device, such as a smartphone, there are components that interfere with magnetic field measurements—traditionally referred to as “hard” and “soft” iron distortions/interferences. An example of a hard iron is a permanent magnet such as those found in the speakers on a smartphone or on the holster in which the smartphone is kept. A soft iron is, for example, a component made from steel such as an EMI shield or the screws or battery contacts found in the smartphone. Steel provides a “lower resistance” path to the magnetic field than does the surrounding air so the field is diverted and the diversion has to be compensated for. The hard iron distortions act like a change of magnetometer bias. The soft iron distortions act like changes to a magnetometer's scale factor. The hard and soft irons need to be accounted for in order to accurately determine heading.
The technical challenges for implementing a three-axis magnetometer and a three-axis accelerometer in a mobile device include dealing with sensor error sources, including bias, scale factor and misalignment of the axes, and distortions of the earth's magnetic field, e.g., hard and soft irons, which contribute to the error of attitude and heading. As cost is often the biggest concern in consumer applications, such as those in a smartphone, a sophisticated and, therefore, expensive, factory calibration of magnetometers and accelerometers is not commercially practical.